package org.msn.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class StringUtil {
    public static String getFormatTime(long time) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("mm:ss");
        return simpleDateFormat.format(new Date(time * 1000));
    }

    public static String getterMethodName(String str) {
        int firstChar = Character.toUpperCase(str.charAt(0));

        str = "get" + (char) firstChar + str.substring(1);

        return str;
    }

    public static String setterMethodName(String str) {
        int firstChar = Character.toUpperCase(str.charAt(0));

        str = "set" + (char) firstChar + str.substring(1);

        return str;
    }
}
